package com.zenchn.enums;

/**
 * 客户等级枚举
 *
 * @author panbingqi
 * @date 2021/06/08 13:21
 */
public enum CustomerLevelTypeEnum {

    /**
     * 一级
     **/
    ONE(1, "一级", "A"),

    /**
     * 二级
     **/
    TWO(2, "二级", "B"),

    /**
     * 三级
     **/
    THREE(3, "三级", "C"),

    /**
     * 四级
     **/
    FOUR(4, "四级", "D"),

    /**
     * 五级
     **/
    FIVE(5, "五级", "E"),
    ;

    CustomerLevelTypeEnum(Integer type, String desc, String hospitalDesc) {
        this.type = type;
        this.desc = desc;
        this.hospitalDesc = hospitalDesc;
    }

    /**
     * Type
     **/
    private Integer type;
    /**
     * 中文描述
     **/
    private String desc;

    /**
     * 医院描述
     **/
    private String hospitalDesc;


    public static String getDesc(Integer type) {
        for (CustomerLevelTypeEnum e : values()) {
            Integer curType = e.getType();
            if (curType.equals(type)) {
                return e.getDesc();
            }
        }
        return "";
    }

    public static String getHospitalDesc(Integer type) {
        for (CustomerLevelTypeEnum e : values()) {
            Integer curType = e.getType();
            if (curType.equals(type)) {
                return e.getHospitalDesc();
            }
        }
        return "";
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getHospitalDesc() {
        return hospitalDesc;
    }

    public void setHospitalDesc(String hospitalDesc) {
        this.hospitalDesc = hospitalDesc;
    }
}
